package startupweekend201311.recipe4u;

import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.app.ActionBar;
import android.app.Activity;
import android.content.Intent;
//import android.view.Menu;
import android.graphics.BitmapFactory;
import android.graphics.drawable.BitmapDrawable;

public class MainActivity extends Activity {

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_main);
		
		Button btn = (Button) findViewById(R.id.btn_login);
		btn.setOnClickListener(new OnClickListener(){
			@Override
			public void onClick(View view) {
				Intent intent = new Intent(MainActivity.this, RecipeMainActivity.class);
				startActivity(intent);
				finish();
			}});

		/*Button btn2 = (Button) findViewById(R.id.btn_regist);
		btn2.setOnClickListener(new OnClickListener(){
			@Override
			public void onClick(View view) {
				Intent intent = new Intent(MainActivity.this, RegisterActivity.class);
				startActivity(intent);
				finish();
			}});*/
		
		ActionBar actionBar = getActionBar();
		actionBar.setBackgroundDrawable(new BitmapDrawable(getResources(), 
				BitmapFactory.decodeResource(getResources(), R.drawable.rogin_bar)));
		actionBar.setHomeButtonEnabled(false);
		actionBar.setDisplayHomeAsUpEnabled(false);
		actionBar.setDisplayShowHomeEnabled(false);
		actionBar.setDisplayShowTitleEnabled(false);
	}

/*	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		// Inflate the menu; this adds items to the action bar if it is present.
		getMenuInflater().inflate(R.menu.main, menu);
		return true;
	}*/

}
